<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="aa" uri="http://ajaxanywhere.sourceforge.net/" %>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>航班调整保障指示</title> 
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/layout.css'/>" />
<script src="<c:url value="/scripts/datetime.js"/>" language="javascript"></script>
<script src="<c:url value="/scripts/common.js"/>" language="javascript"></script>

<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type='text/javascript' src='dwr/interface/FlightAdjustFoodRemote.js'></script>
<script type='text/javascript' src='dwr/interface/FlightAdjustHotelRemote.js'></script>
<script type='text/javascript' src='dwr/interface/FlightAdjustCarRemote.js'></script>


<script src="<c:url value='/scripts/ajax/aa.js'/>"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
<!-- 
<script> 
	function saveFood(){ 
	ajaxAnywhere.getZonesToReload = function() {
    return "foodZone";
	}
	 ajaxAnywhere.getAJAX('./flightAdjustFood.html?flightInfoId=<c:out value="${param.flightInfoId}"/>&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>','foodZone')
     //ajaxAnywhere.submitAJAX(); 
	}
</script>
 -->
 <script> 
	function saveFood(){ 
	ajaxAnywhere.getZonesToReload = function() {
    return "foodZone";
	}
	 ajaxAnywhere.getAJAX('./abnormal.html?method=showTips&flightInfoId=<c:out value="${param.flightInfoId}"/>&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>','foodZone')
     //ajaxAnywhere.submitAJAX(); 
	}
</script>
<!-- 
<script> 
	function saveHotel(){ 
	ajaxAnywhere.getZonesToReload = function() {
    return "hotelZone";
	}
	 ajaxAnywhere.getAJAX('./flightAdjustHotel.html?flightInfoId=<c:out value="${param.flightInfoId}"/>&step=1&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>','hotelZone')
     //ajaxAnywhere.submitAJAX(); 
	}
</script>
 -->
 <script> 
	function saveHotel(){ 
	ajaxAnywhere.getZonesToReload = function() {
    return "hotelZone";
	}
	 ajaxAnywhere.getAJAX('./abnormal.html?method=showTips&flightInfoId=<c:out value="${param.flightInfoId}"/>&step=1&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>','hotelZone')
     //ajaxAnywhere.submitAJAX(); 
	}
</script>
<script> 
	function saveCar(){ 
	ajaxAnywhere.getZonesToReload = function() {
    return "carZone";
	}
	ajaxAnywhere.getAJAX('./abnormal.html?method=showTips&flightInfoId=<c:out value="${param.flightInfoId}"/>&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>','carZone')
   //ajaxAnywhere.submitAJAX(); 
	}
</script>
<script>
	var bln = false;
	function changeDiv(eltName,img){ 
  		var el = document.getElementById(eltName);  
		bln = !bln; 
		if(bln){
			img.src="images/menu_ico.gif";
		}else{
			img.src="images/menu_ico_up.gif";			
		}
		display(eltName);

	}
	 
	function display(y){$(y).style.display=($(y).style.display=="none")?"":"none";} 
	function $(s){return document.getElementById(s);}
 
</script>
</head>


<body leftmargin="0" topmargin="0">
<html:form action="abnormal" method="post">
<input type=hidden name=id value="<c:out value="${flightAdjustInstruction.id}"/>"/>
<input type=hidden name=flightInfoId id="flightInfoId"  value='<c:out value="${param.flightInfoId}"/>'>
<input type=hidden name=flightAdjustInfoId id="flightAdjustInfoId" value='<c:out value="${flightAdjustInfo.id}"/>'>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="44" class="home-content-title"><img src="images/home_ico_listTitle.gif" width="22" height="20" align="absmiddle"> 航班调整保障指示</td>
  </tr>
   <tr id="messageShowTrId" style="display:none;">
	<td valign="top" class="black12">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
	<td class="arror_bg_s">
	<span class="arror_title_s"> 
        保存信息成功!<br/>
     </span>
    </td>
    </tr>
    </table>
	</td>
	</tr>
	<logic:messagesPresent>
		<tr id="messagesPresentTrId" style="display:;">
			<td valign="top" class="black12" height="20">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
					<tr>
						<td class="arror_bg">
							<span class="arror_title">
						     您的操作存在如下错误：<br></span>
						     <html:errors/>
					    </td>
				    </tr>
			    </table>
			</td>
		</tr>
   </logic:messagesPresent>
	
	
  <tr>
    <td valign="top"> 
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="home-table-topline"> </td>
        </tr>
        <tr> 
          <td class="home-table-leftline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-tool-content"> 
        		  <input name="Submit33" type="button" class="home-inputBtn"  value="保存" onclick="onSave()" 
	           		<logic:messagesNotPresent>
					  <c:if test="${'send' eq param.mode || '2' eq param.type}">
					  	disabled
					  </c:if>	
	           		</logic:messagesNotPresent>   	
				  />
                  
                  
            
		  <input name="Submit33" type="button" class="home-inputBtn"  value="保存并提交" onclick="send()" 
		<logic:messagesNotPresent>
		  <c:if test="${'send' eq param.mode || '2' eq param.type}">
		  	disabled
		  </c:if>	
		</logic:messagesNotPresent>
		  >
		 
		 <input name="reset" type="reset" class="home-inputBtn" value="重置" 
         			<logic:messagesNotPresent>
		  <c:if test="${'send' eq param.mode || '2' eq param.type}">
		  	disabled
		  </c:if>	
		</logic:messagesNotPresent>			  
				  />  
		  
		</td>
              </tr>
              <tr>
                <td align="center" valign="top">&nbsp;</td>
              </tr>
              <tr> 
                <td valign="top" class="home-edittable-space"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td><table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">
                          <tr> 
                            <td width="20%" class="home-subtable-view-tdstyle-right">发布时间：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightAdjustInfo.publishTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                            <td width="20%" class="home-subtable-view-tdstyle-right">航班号：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.flightNum}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">始发站：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.dan}"/></td>
                            <td class="home-subtable-view-tdstyle-right">终点站：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.aan}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">计划起飞日期/时间：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightAdjustInfo.std}" pattern="yyyy-MM-dd HH:mm"/></td>
                            <td class="home-subtable-view-tdstyle-right">调整后起飞日期/时间：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightAdjustInfo.currentTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">调整类别：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:if test="${flightAdjustInfo.adjustType==1}">临时性调整</c:if>
                            <c:if test="${flightAdjustInfo.adjustType==2}">临时性取消</c:if>
                            <c:if test="${flightAdjustInfo.adjustType==3}">计划性调整</c:if>
                            <c:if test="${flightAdjustInfo.adjustType==4}">计划性取消</c:if>
                            </td>
                            <td class="home-subtable-view-tdstyle-right">调整原因：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.reasonInName}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">公务舱人数：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.passagerNum}"/></td>
                            <td class="home-subtable-view-tdstyle-right">经济舱人数：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.econNum}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">总人数：</td>
                            <td colspan=3 class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.passagerTotal}"/></td>
						  </tr>
                        
                        </table></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>  
                      <td>
                    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	                    	<tr>
		                      <td class="home-table-tool-content">保障指示</td>
	    	                   <td class="home-table-tool-content" style="text-align:right;"><img src="images/menu_ico_up.gif"  onClick="changeDiv('protect',this);" style="cursor:hand"/></td>
	  						</tr>
  						</table>
  						</td>  	 
                    </tr>
                    <tr id="protect"> 
                      <td><table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">
							<tr>
								<td class="home-subtable-view-tdstyle-right" nowrap="nowrap">是否需提供餐食：</td>
								<td class="home-subtable-view-tdstyle-left">
									<select class="home-table-inputbox" name="needFood" id="needFood" onchange="javascript:ifShow('food',this.value)">
									<option value=1 <c:if test="${flightAdjustInstruction.needFood == 1}">selected</c:if>>是</option>
									<option value=0 <c:if test="${flightAdjustInstruction.needFood == 0}">selected</c:if>>否</option>
									</select>                    
								</td>
								<td class="home-subtable-view-tdstyle-right" nowrap="nowrap">是否需安排住宿：</td>
								<td class="home-subtable-view-tdstyle-left">
									<select class="home-table-inputbox" name="needHotel" id="needHotel" onchange="javascript:ifShow('hotel',this.value)">
									<option value=1 <c:if test="${flightAdjustInstruction.needHotel == 1}">selected</c:if>>是</option>
									<option value=0 <c:if test="${flightAdjustInstruction.needHotel == 0}">selected</c:if>>否</option>
									</select>                    
								</td>
								<td class="home-subtable-view-tdstyle-right">是否需补偿：</td>
								<td class="home-subtable-view-tdstyle-left">
									<select class="home-table-inputbox" name="needCompensation" id="needCompensation">
									<option value=1 <c:if test="${flightAdjustInstruction.needCompensation == 1}">selected</c:if>>是</option>
									<option value=0 <c:if test="${flightAdjustInstruction.needCompensation == 0}">selected</c:if>>否</option>
									</select>                    
								</td>
							</tr>
							<tr> 
								<td width="10%" class="home-subtable-view-tdstyle-right"><font color="red">*</font>保障指示：</td>
								<td colspan=5 class="home-subtable-view-tdstyle-left"><textarea  name="instruction" class="home-table-inputbox" cols="81" rows="2"><c:out value="${flightAdjustInstruction.instruction}"/></textarea> 
								</td>
							</tr>
                        </table></td>
                    </tr>
                    
                    <tr id="foodSeparateTrId" style="display: "> 
                      <td>&nbsp;</td>
                    </tr>
             
					<tr id="foodListTrId" style="display: "> 
						<td valign="top" class="home-tab-line"> 
						<table width="100%" border="0" cellspacing="0" cellpadding="4">
						<tr>  
						  <td>
	                    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		                    	<tr>
			                      <td class="home-table-tool-content">餐食安排指示</td>
		    	                   <td class="home-table-tool-content" style="text-align:right;"><img src="images/menu_ico_up.gif"  onClick="changeDiv('foodtips1',this);changeDiv('foodtips2',this);changeDiv('foodFormTrId',this);" style="cursor:hand"/></td>
		  						</tr>
	  						</table>
  						</td>  
						</tr>
						
						<tr id="foodtips1"> 
						  <td> 

							<input name="button" type="button" id="NewCreat_1" class="home-inputBtn" value="新增" <logic:messagesNotPresent>
		  <c:if test="${'send' eq param.mode || '2' eq param.type}">
		  	disabled
		  </c:if>	
		</logic:messagesNotPresent>
		 onclick="MM_openBrWindow('./flightAdjustFood.html?method=edit&flightInfoId=<c:out value='${param.flightInfoId}'/>',null,'top=200,height=230,width=400,status=no,toolbar=no,menubar=no,location=no scrollbars=yes')"> 
							
   <input name="button" type="button" class="home-inputBtn" 	
   <logic:messagesNotPresent>
		  <c:if test="${'send' eq param.mode || '2' eq param.type}">	
		  	disabled
		  </c:if>	
		</logic:messagesNotPresent>  value="删除" onclick="deleteFood()"> 
						  </td>
						</tr>
						<tr id="foodtips2"> 
						<td class="home-tab-list-bg"> 
						<br><aa:zone name="foodZone">
						<table width="100%" border="0" cellspacing="1" cellpadding="2" class="home-subtable-bgcolor">
								<tr> 
									<td width="5%"  class="home-table-tool-conten">   <input type="checkbox" name="checkbox" value="checkbox" onclick="chooseAll(this)" /><br></td>
									<td width="20%" class="home-table-tool-conten">餐食名称<br></td>
									<td width="20%" class="home-table-tool-conten">份数<br></td>
									<td width="20%" class="home-table-tool-conten">单价<br></td>
									<td width="20%" class="home-table-tool-conten">合计<br></td>
									<td width="15%" class="home-table-tool-conten">编辑<br></td>
								</tr>
								<c:forEach var="results" items="${FOOD_FLIGHT_LIST}" varStatus="status">
								<tr> 
									<td class="home-tab-content"><input type="checkbox" name="selected_id" value="<c:out value='${results.id}'/>" /><br></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.foodName}"/><br></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.amount}"/><br></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.price}"/><br></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.total}"/><br></td>
									<td class="home-tab-content"><img src="images/update.gif" width="12" height="14" border=0  
									<logic:messagesNotPresent>
									  <c:if test="${'send' ne param.mode && '2' ne param.type}">
									onclick="MM_openBrWindow('./flightAdjustFood.html?method=edit&id=<c:out value="${results.id}"/>&flightInfoId=<c:out value='${param.flightInfoId}'/>',null,'top=200,height=200,width=400,status=no,toolbar=no,menubar=no,location=no scrollbars=yes');" 
										  </c:if>	
							       </logic:messagesNotPresent>
									style="cursor:hand"/><br></td>
							     
								</tr>
								</c:forEach> 
									<tr> 
									<td class="home-tab-content">&nbsp;<br></td>
									<td class="home-tab-content"><b>总计：</b><br></td>
									<td class="home-tab-content"><br><b></b></td>
									<td class="home-tab-content">&nbsp;</td>
									<td class="home-tab-content"><b><c:out value="${totalMoney}"/>元</b></td>
									<td class="home-tab-content">&nbsp;</td>
								</tr>
							</table>
					</aa:zone>
				
					
						</td>
						</tr>
						</table>
						
						</td>
					</tr>
                 
                    <tr id="foodFormTrId" style="display: "> 
                      <td><table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">
                          <tr> 
                            <td width=20% class="home-subtable-view-tdstyle-right">交接地点：</td>
                            <td width=30% class="home-subtable-view-tdstyle-left"> <input type=text name=foodAddress class="home-table-inputbox" value="<c:out value="${flightAdjustInstruction.foodAddress}"/>"/></td>
                            <td width=20% class="home-subtable-view-tdstyle-right">期望交接餐食时刻：</td>

                            <td width=30% class="home-subtable-view-tdstyle-left">
                          
                            <input type=text name=foodTime class="home-table-inputbox" value="<c:out value="${flightAdjustInstruction.foodTime}"/>"/>&nbsp;<img src="images/date.gif" border="0" onclick="fPopCalendar(foodTime,foodTime);return false"></td>
                             
                          </tr>
                        </table></td>
                    </tr>
                    
                    <tr id="hotelSeparateTrId" style="display: "> 
                      <td>&nbsp;</td>
                    </tr>
               
                    <tr id="hotelTitleTrId" style="display: ">  
                       <td>
	                    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		                    	<tr>
			                      <td class="home-table-tool-content">住宿安排指示</td>
		    	                   <td class="home-table-tool-content" style="text-align:right;"><img src="images/menu_ico_up.gif"  onClick="changeDiv('hotelListTrId',this);" style="cursor:hand"/></td>
		  						</tr>
	  						</table>
  						</td>  
                    </tr>
					<tr id="hotelListTrId" style="display: "> 
						<td valign="top" class="home-tab-line"> 
						<table width="100%" border="0" cellspacing="0" cellpadding="4">
						<tr> 
						  <td> 

							<input name="button" type="button" id="NewCreat_2" class="home-inputBtn" value="新增" 
							<logic:messagesNotPresent>
		  <c:if test="${'send' eq param.mode || '2' eq param.type}">
		  	disabled
		  </c:if>	
		</logic:messagesNotPresent> onclick="MM_openBrWindow('./flightAdjustHotel.html?method=edit&step=1&flightInfoId=<c:out value="${param.flightInfoId}"/>',null,'top=200,height=200,width=400,status=no,toolbar=no,menubar=no,location=no scrollbars=yes')"> 
							<input name="button" type="button" class="home-inputBtn" value="删除" 		<logic:messagesNotPresent>
		  <c:if test="${'send' eq param.mode || '2' eq param.type}">
		  	disabled
		  </c:if>	
		</logic:messagesNotPresent> onclick="deleteHotel()"> 
						  </td>
						</tr>
						<tr> 
						<td class="home-tab-list-bg"> 
						<aa:zone name="hotelZone">
						<table width="100%" border="0" cellspacing="1" cellpadding="2" class="home-subtable-bgcolor">
								<tr> 
									<td width="5%"  class="home-table-tool-conten"> <input type="checkbox" name="checkbox1" value="checkbox" onclick="chooseElse(this)" /></td>
									<td width="30%" class="home-table-tool-conten">酒店名称</td>
									<td width="25%" class="home-table-tool-conten">联系电话</td>
									<td width="20%" class="home-table-tool-conten">地址</td>
									<td width="15%" class="home-table-tool-conten">单价</td>
									<td width="20%" class="home-table-tool-conten">编辑</td>
								</tr>
								 <c:forEach var="results" items="${HOTEL_FLIGHT_LIST}" varStatus="status">
								<tr> 
									<td class="home-tab-content">&nbsp;<input type="checkbox" name="selected_id_1" value="<c:out value='${results.id}'/>" /></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.name}"/></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.phone}"/></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.address}"/></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.price}"/>&nbsp;元</td>
									<td class="home-tab-content"><img src="images/update.gif" width="12" height="14" border=0
									<logic:messagesNotPresent>
									  <c:if test="${'send' ne param.mode && '2' ne param.type}">
									 onclick="MM_openBrWindow('./flightAdjustHotel.html?method=edit&id=<c:out value='${results.id}'/>&flightInfoId=<c:out value="${param.flightInfoId}"/>&step=1',null,'top=200,height=200,width=400,status=no,toolbar=no,menubar=no,location=no scrollbars=yes')" 
									   </c:if>	
		                             </logic:messagesNotPresent>
									 style="cursor:hand" /></td>
								</tr>
								</c:forEach> 	
							</table>
							</aa:zone>
						</td>
						</tr>
						</table>
						</td>
					</tr>
                    
                    <tr> 
                      <td>&nbsp;</td>
                    </tr>
                    <tr>  
                      <td>
	                    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		                    	<tr>
			                      <td class="home-table-tool-content">车辆安排指示</td>
		    	                   <td class="home-table-tool-content" style="text-align:right;"><img src="images/menu_ico_up.gif"  onClick="changeDiv('cartips',this);" style="cursor:hand"/></td>
		  						</tr>
	  						</table>
  						</td> 
                    </tr>
                  
					<tr id="cartips"> 
						<td valign="top" class="home-tab-line"> 
						<table width="100%" border="0" cellspacing="0" cellpadding="4">
						<tr> 
						  <td> 
							<input name="button" type="button" class="home-inputBtn" value="新增" 		<logic:messagesNotPresent>
		  <c:if test="${'send' eq param.mode || '2' eq param.type}">
		  	disabled
		  </c:if>	
		</logic:messagesNotPresent> onclick="MM_openBrWindow('./flightAdjustCar.html?method=edit&flightInfoId=<c:out value="${param.flightInfoId}"/>',null,'top=200,height=300,width=700,status=no,toolbar=no,menubar=no,location=no scrollbars=yes')"> 
							<input name="button" type="button" class="home-inputBtn" 		<logic:messagesNotPresent>
		  <c:if test="${'send' eq param.mode || '2' eq param.type}">
		  	disabled
		  </c:if>	
		</logic:messagesNotPresent> value="删除" onclick="deleteCar()"> 
						  </td>
						</tr>
						<tr> 
						<td class="home-tab-list-bg"> 
						<aa:zone name="carZone">
						<table width="100%" border="0" cellspacing="1" cellpadding="2" class="home-subtable-bgcolor">
								<tr> 
									<td width="5%"  class="home-table-tool-conten"><input type="checkbox" name="checkbox2" value="checkbox" onclick="chooseOther(this)" /></td>
									<td width="18%" class="home-table-tool-conten">旅客人数</td>
									<td width="18%" class="home-table-tool-conten">候车时间</td>
									<td width="18%" class="home-table-tool-conten">候车地点</td>
									<td width="18%" class="home-table-tool-conten">目的地</td>
									<td width="18%" class="home-table-tool-conten">预计接回时间</td>
									<td width="5%" class="home-table-tool-conten">编辑</td>
								</tr>
								<c:forEach items="${CAR_FLIGHT_LIST}" var="results" varStatus="status">
								<tr> 
									<td class="home-tab-content"><input type="checkbox" name="selected_id_2" value="<c:out value='${results.id}'/>" /></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.amount}"/></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.waitTime}"/></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.waitAddress}"/></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.destination}"/></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.returnTime}"/></td>
									<td class="home-tab-content"><img src="images/update.gif" width="12" height="14" border=0  
									<logic:messagesNotPresent>
									  <c:if test="${'send' ne param.mode && '2' ne param.type}">
									onclick="MM_openBrWindow('./flightAdjustCar.html?method=edit&id=<c:out value='${results.id}'/>&flightInfoId=<c:out value="${param.flightInfoId}"/>',null,'top=200,height=300,width=700,status=no,toolbar=no,menubar=no,location=no scrollbars=yes')" 
									
									 </c:if>	
		                         </logic:messagesNotPresent>
									style="cursor:hand" /></td>
								</tr>
								</c:forEach>
							</table>
							</aa:zone>
						</td>
						</tr>
						</table>
						</td>
					</tr>	
						
					<!--
					<tr> 
                      <td><table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">
                          <tr> 
                            <td width=10% class="home-subtable-view-tdstyle-right">备注：</td>
                            <td colspan="5" class="home-subtable-view-tdstyle-left"><textarea name="textarea2" class="home-table-inputbox" cols="81" rows="2"></textarea></td>
                          </tr>
                        </table></td>
                    </tr>
					-->
                  </table> 
                  
                </td>
              </tr>
            </table>
		  </td>
        </tr>
        <tr> 
          <td height="12">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-bottom-left">&nbsp;</td>
                <td class="home-table-bottom-bg">&nbsp;</td>
                <td class="home-table-bottom-right">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
	  
	  </td>
  </tr>
  <tr>
    <td height="10">&nbsp;</td>
  </tr>
</table>

</html:form>
</body>
<script>
//written by kellen 07-04-19
initializePage();
	
  	
  function deleteFood(){
  
  var elements = document.getElementsByName("selected_id");
  var selected=new Array();
  for (var i=0;i <elements.length; i++){
     var e = elements[i];
     if(e.checked){
         var bb = e.value; 
		selected.push(bb);
	 }
  }
  if(0!=selected.length){
  if(confirm("确实要删除?")){
   FlightAdjustFoodRemote.deleteFood(selected,deleteFoodCallBack);
  }else return;
  }else{
			alert("<fmt:message key="common.delete.message"/>");
		}	
  }	
  function deleteFoodCallBack(bln){
	if(bln){
	
	       ajaxAnywhere.getZonesToReload = function() {
    return "foodZone";
	}
	ajaxAnywhere.getAJAX('./flightAdjustFood.html?flightInfoId=<c:out value="${param.flightInfoId}"/>&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>','foodZone')
	}
}
function deleteHotel(){
  var elements=document.getElementsByName("selected_id_1");
  var selected=new Array();
  for(var i=0;i<elements.length;i++){
     var e=elements[i];
     if(e.checked){
        var bb=e.value;
        selected.push(bb);
      }
    
  }
  if(0!=selected.length){
  if(confirm("确实要删除?")){
  FlightAdjustHotelRemote.deleteHotel(selected,deleteHotelCallBack);
   }else return;
   }else{
			alert("<fmt:message key="common.delete.message"/>");
		}	 
}
function deleteHotelCallBack(bln){
   if(bln){
       
       ajaxAnywhere.getZonesToReload = function() {
    return "hotelZone";
	}
	ajaxAnywhere.getAJAX('./flightAdjustHotel.html?flightInfoId=<c:out value="${param.flightInfoId}"/>&step=1&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>','hotelZone')
   }
}
function deleteCar(){
  var elements=document.getElementsByName("selected_id_2");
  var selected=new Array();
  for(var i=0;i<elements.length;i++){
     var e=elements[i];
     if(e.checked){
        var bb=e.value;
        selected.push(bb);
      }
    
  }
  if(0!=selected.length){
  if(confirm("确实要删除?")){
  FlightAdjustCarRemote.deleteCar(selected,deleteCarCallBack);
   }else return;
  
  }else{
			alert("<fmt:message key="common.delete.message"/>");
		}	 
}
function deleteCarCallBack(bln){
   if(bln){
  
   ajaxAnywhere.getZonesToReload = function() {
    return "carZone";
	}
	ajaxAnywhere.getAJAX('./flightAdjustCar.html?flightInfoId=<c:out value="${param.flightInfoId}"/>&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>','carZone')
   }
}
function onSave(){
  document.forms[0].method="post";
  document.forms[0].action="abnormal.html?method=saveTips&workItemId=<c:out value="${param.workItemId}"/>&processinstid=<c:out value="${param.processinstid}"/>&appId=<c:out value="${param.appId}"/>&flightInfoId=<c:out value="${param.flightInfoId}"/>&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>";
  document.forms[0].submit();
}

function cancel(){
 document.forms[0].method="post";
  document.forms[0].action="abnormal.html?method=showProtect&flightInfoId=<c:out value="${param.flightInfoId}"/>&flightAdjustInfoId=<c:out value="${param.flightAdjustInfoId}"/>";
  document.forms[0].submit();
}
//add by kellen
function send(){
	document.forms[0].action="abnormal.html?method=saveTips&mode=send&appId=<c:out value="${param.appId}"/>&workItemId=<c:out value="${param.workItemId}"/>&processinstid=<c:out value="${param.processinstid}"/>";
	document.forms[0].submit();
}

//if show the list
function ifShow(param,bl){
  elementId_s=param+"SeparateTrId";
  elementId_t=param+"TitleTrId";
  elementId_l=param+"ListTrId";
  elementId_f=param+"FormTrId";
  var element_s=document.getElementById(elementId_s);
  var element_t=document.getElementById(elementId_t);
  var element_l=document.getElementById(elementId_l);
  var element_f=document.getElementById(elementId_f);
  if(bl=='1'){
    if(element_s!=null)
      element_s.style.display="";
	if(element_t!=null)
	  element_t.style.display="";
	if(element_l!=null)
	  element_l.style.display="";
	if(element_f!=null)
	  element_f.style.display="";
  
  }else{
     if(element_s!=null)
      element_s.style.display="none";
	if(element_t!=null)
	  element_t.style.display="none";
	if(element_l!=null)
	  element_l.style.display="none";
	if(element_f!=null)
	  element_f.style.display="none";
  }
}

//initialize page when open this page
function initializePage(){
  var needFood=document.getElementById("needFood");
  var needHotel=document.getElementById("needHotel");
  
  var needFoodVal=needFood.value;
  var needHotelVal=needHotel.value;
  if(needFoodVal=='0')
    ifShow('food','0');
  if(needHotelVal=='0')
    ifShow('hotel','0');
}
</script>
<script>
//保存信息处理 add by kellen
if("1"=='<c:out value="${flag}"/>'){
	//alert("保存信息成功!");
	var messageShowTrIdTd=document.getElementById("messageShowTrId");
	messageShowTrIdTd.style.display="";
	//window.location=window.location;  
}else if("-1"=='<c:out value="${flag}"/>'){
	alert("保存信息失败!");
	 
}else if("2" ==  '<c:out value="${flag}"/>'){
	//window.location=window.location;  
}


</script>

</html>
